home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 …ember: Reference Library / Dev.CD Dec 97 RL.toast / What's New / Tool Chest / Testing & Debugging / Virtual User / Examples / External Tool Templates / CPlus Tool Template / READ ME FIRST! next >
Encoding:
Text File  |  1997-10-15  |  2.9 KB  |  63 lines  |  [ttro/ttxt]

  1. January 10, 1995
  2.  
  3. How to use the experimental Threaded Virtual User External Tool:
  4.  
  5. The basic idea is for a single external tool to be able to execute multiple 
  6. service requests concurrently, which is a fancy way of saying "at the 
  7. same time." The existing template(s) can only execute one service at a time, 
  8. and must complete each service call before beginning the next one.
  9.  
  10. Many services are very short and will not benefit from threading. Others 
  11. take several seconds or minutes, or you may want to leave a service call 
  12. running for the entire duration of a script. Threading the tool allows its 
  13. client scripts to access it as if each script was the only client. By calling 
  14. services asynchronously from VU, you can even execute multiple services  
  15. concurrently from the same script.
  16.  
  17. First, you need to install the Thread Manager on the host and/or target, 
  18. depending on where you want to run the tool. The threaded tool will work 
  19. without the Threads Manager present, but will not execute threaded services. 
  20. If you are using system software older than 7.5, drag the Thread Manager 
  21. extension to the System Folder and restart. If you are using System 7.5, it 
  22. already contains the Thread Manager. 
  23.  
  24. (Note: the Thread Manager increases the performance of the Virtual User 
  25. application even when external tools are not involved, so you may want 
  26. to leave it installed on the host.)
  27.  
  28. Thread Manager 2.0.1 is provided with VU 2.1a2. There is a newer version 
  29. somewhere on the ETO CD. Either one should work, but this template 
  30. was developed with 2.0.1 and has not yet been tested with the new version.
  31.  
  32. Second, copy the CPlus Tool Template folder from the ETO CD to a local 
  33. hard disk. You may need to rebuild the desktop if VU can not find the tool
  34. application.
  35.  
  36. The tool is already compiled and ready to run. The script to test it is 
  37. called "ThreadedVUTool.vu", and this requires VU 2.1 to run. Play with the 
  38. EchoThread service. Its only function is to demonstrate how to use threads 
  39. in a VU external tool. It will echo a list after pausing for a period of time. 
  40. You can change the amount of time and other things through the script 
  41. parameters.
  42.  
  43. Third, read the DocViewer document called "VU 2.1 Tool Template design". 
  44. It describes the internal C++ non-threaded external tool model, and then 
  45. describes the changes made to implement threaded service calls.
  46.  
  47. If you do not understand the Thread Manager, DON'T WORRY, BE HAPPY!! The 
  48. good news is that you do not have to understand threads to use them in the 
  49. new C++ external tool template.
  50.  
  51. All you have to do is define new Service objects like before, but declare 
  52. them as ThreadedService objects instead. Just like before, you need to call 
  53. the CheckForCancel() function regularly. AND THAT'S ALL!! The template does 
  54. all the rest for you.
  55.  
  56. If you want to get serious about threads, read the Thread Manager 
  57. documention, located elsewhere on the ETO CD.
  58.  
  59.  
  60. Have fun,
  61.  
  62. Stuart Russell
  63. HLQ Automation Technical Lead